package pers.jason.wppm.workflow.entity;

import lombok.Data;
import org.activiti.engine.impl.persistence.entity.ProcessDefinitionEntity;

import java.io.Serializable;

/**
 * @Author: JZH
 * @Date: 2018/11/13 23:33
 * @Description:
 */
@Data
public class ProcessDefinitionResult implements Serializable {

    private static final long serialVersionUID = 1L;

    private String key;

    private int revision = 1;

    private int version;

    private String deploymentId;

    private String resourceName;

    private Integer historyLevel;

    private String diagramResourceName;

    public ProcessDefinitionResult() {
    }


    public ProcessDefinitionResult(ProcessDefinitionEntity entity) {
        this.key = entity.getKey();
        this.revision = entity.getRevision();
        this.version = entity.getVersion();
        this.deploymentId = entity.getDeploymentId();
        this.resourceName = entity.getResourceName();
        this.historyLevel = entity.getHistoryLevel();
        this.diagramResourceName = entity.getDiagramResourceName();
    }

}
